-- GENERATED SPELL FOR [Dark Rune Stormcaller] --


function spell0_27984(pUnit, Event) --@Lightning Bolt,n/a--
pUnit:FullCastSpellOnTarget(12167,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27984', 3000, 1)
end

function spell1_27984(pUnit, Event) --@Lightning Bolt,n/a--
pUnit:FullCastSpellOnTarget(59863,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27984', 3000, 1)
end

function spell2_27984(pUnit, Event) --@Shadow Word: Pain,n/a--
pUnit:FullCastSpellOnTarget(15654,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27984', 18000, 1)
end

function spell3_27984(pUnit, Event) --@Shadow Word: Pain,n/a--
pUnit:FullCastSpellOnTarget(59864,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27984', 8000, 1)
end

function Sorts_27984(pUnit, Event)
local choix_sorts_27984 = math.random(0, 3)
if choix_sorts_27984 == 0 then
pUnit:RegisterEvent('spell0_27984', 1, 1)
end
if choix_sorts_27984 == 1 then
pUnit:RegisterEvent('spell1_27984', 1, 1)
end
if choix_sorts_27984 == 2 then
pUnit:RegisterEvent('spell2_27984', 1, 1)
end
if choix_sorts_27984 == 3 then
pUnit:RegisterEvent('spell3_27984', 1, 1)
end
end

function mob27984_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_27984', math.random(1500, 3000), 1)
end

function mob27984_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27984_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27984_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(27984, 1, 'mob27984_Action')
RegisterUnitEvent(27984, 2, 'mob27984_Leave')
RegisterUnitEvent(27984, 3, 'mob27984_Kill')
RegisterUnitEvent(27984, 4, 'mob27984_Die')
